<template>
<!-- 实时热点 -->
  <div class="hotspot">
        <div class="hotspot-title">
            <span class="hotspot-title-l">实时热点</span>
            <span class="hotspot-title-r">
                <i></i>
                <span @click="hotspotChange">换一换</span>
            </span>
        </div>
        <!-- 热点数据 -->
        <div class="hotspot-content">
          <span v-for="(value,index) in hotData" :key="index"><span>{{value.content}}</span><i v-show="value.icon != 0"></i></span>
        </div>
    </div>
</template>

<script>
export default {
  props: [
    'hotData'// 父页面传回热点数据
  ],
  mounted: function () {},
  methods: {
    // 点击换一换事件
    hotspotChange: function () {
      this.$emit('hotspotChange') // 调用父页面hotspotChange方法
    }
  }
}
</script>

<style>
  @import '../../static/components/hotspot.css'
</style>

